// pages/details/consume/consume.js
var httpUtil = require('../../../utils/httpUtil.js')
var uiUtil = require('../../../utils/uiUtil.js')
const app = getApp()
var that

Page({

  /**
   * 页面的初始数据
   */
  data: {
    cardDetail:null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    that = this;
    that.details(options.orderId);
  },

  /**
   * 获取会员卡余额明细详情
   */
  details(orderId) {
    httpUtil.PostRequest("card_detail", {
      orderId: orderId
    }, {
      success(res) {
        that.setData({
          cardDetail: res
        })
      },
      fail(code, res) {
        uiUtil.showToast(res);
      },
      complete() { }
    })
  },
  
})